﻿
//登陆
function Log() {
    if (this.req.responseText == "LoginFailed") {
        alert("登陆失败"); 
        return;
     }
     MY_NAME = document.getElementById("name").value;
     document.getElementById("MyLogo").innerHTML = "<IMG src='Resource/Image/UserHead/"+MY_NAME+"_Head.jpg'/>";
        document.getElementById("login").innerHTML = "";
        document.getElementById("sideBarRight").click();
        document.getElementById("systemFunction").innerHTML += "<button onclick ='HeadImgUploadForm();'>头像上传/更改</button>" +
        "<button onclick='MyProfileReq()'>资料查看/修改</button>" +
        "<div onclick='GetSystemInfoXml();' style='cursor:pointer;'>系统消息("+"<span id='SystemInfoNumber'></span>"+")</div>" +
        "<button onclick='LookForFriend()'>找朋友</button>";
        if (document.getElementById("myFriendsList").innerHTML == "") {
            document.getElementById("myFriendsList").innerHTML = "加载中…";
        }
        Listen();
}
function UserLog(source) {
    var name = document.getElementById("name").value;
    var pw = document.getElementById("password").value;
    if (name == "" || pw == "") return;
    var url = "AjaxResponse/Login.aspx?name=" + encodeURIComponent(name) + "&password=" + encodeURIComponent(pw);
    new ContentLoader(url,  Log);

}

    